//
//  KHAccess_Settings.m
//  KHMall
//
//  Created by yanyan on 16/11/1.
//  Copyright © 2016年 198. All rights reserved.
//

#import "KHAccess_Settings.h"
#import "CYAppSettings.h"
#define kAppsVersionKeyPreference @"appversion_preference"
#define kAppRequestUrlKeyPreference @"enabled_mallurlpreference"
@implementation KHAccess_Settings
+(void)readMallSettings{
    [[CYAppSettings SharedInstance]readingPreferences];
    NSString *appVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
    [[NSUserDefaults standardUserDefaults] setValue:appVersion forKey:@"appversion_preference"];
    [[NSUserDefaults standardUserDefaults] synchronize];
}
+ (NSString *)urlBaseString{
    if ([[NSUserDefaults standardUserDefaults] boolForKey:kAppRequestUrlKeyPreference]) {
        return @"http://app.sdkhcm.com/api/";
    } else {
      return @"http://192.168.1.212/api/";
    }
}
@end
